﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PrinterBudi.Persistence;

namespace PrinterBudi.Web.Controllers
{
    public class ProfileController : Controller
    {
        //
        // GET: /Profile/
        [HttpPost]
        public ActionResult Index(string completeName, string address)
        {
            PBUser user = PBUserModel.Read((int)Session["userId"]);
            user.Name = completeName;
            user.Address = address;
            PBUserModel.Update(user);
            return Redirect("/Home?success=1");
        }

    }
}
